<!--!
This file is a part of MediaDrop (http://www.mediadrop.net),
Copyright 2009-2013 MediaCore Inc., Felix Schwarz and other contributors.
For the exact contribution history, see the git revision log.
The source code contained in this file is licensed under the GPLv3 or
(at your option) any later version.
See LICENSE.txt in the main project directory, for more information.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:i18n="http://genshi.edgewall.org/i18n">
<xi:include href="./layout.html" />
<xi:include href="../master.html" />
<head>
	<title>${h.page_title(default=c.category and '%s | %s' % (c.category.name, _('Categories')) or _('Categories'), category=c.category or 'all')}</title>
	<meta name="keywords" content="${h.meta_keywords(category=c.category or 'all')}" />
	<meta name="description" content="${h.meta_description(category=c.category or 'all')}" />
	<meta py:strip="h.meta_robots_noindex(category=c.category or 'all')" name="robots" content="noindex,follow" />
	<link href="${h.url_for('/styles/categories.css')}" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>
	<div py:if="latest" id="category-latest" class="${popular and 's-grid-column' or None}" py:with="latest_url = c.category and h.url_for(action='more', order='latest') or h.url_for(controller='/media', show='latest')">
		<h2><a href="${latest_url}" class="underline-hover uppercase">Latest</a></h2>
		<ul py:replace="media_grid(latest, thumb_size='s', desc_len=95)" />
		<a class="mcore-btn mcore-btn-grey mcore-btn-more" href="${latest_url}"><span>${h.best_translation(N_('More new media'), N_('View More'))}</span></a>
	</div>
	<div py:if="popular" id="category-popular" class="s-grid-column" py:with="popular_url = c.category and h.url_for(action='more', order='popular') or h.url_for(controller='/media', show='popular')">
		<h2><a href="${popular_url}" class="underline-hover uppercase">Most Popular</a></h2>
		<ul py:replace="media_grid(popular, thumb_size='s', desc_len=95)" />
		<a class="mcore-btn mcore-btn-grey mcore-btn-more" href="${popular_url}"><span>${h.best_translation(N_('More popular media'), N_('View More'))}</span></a>
	</div>
	<div py:if="not popular and not latest">There is no media in this category.</div>
</body>
</html>
